package cn.comtom.ewbs.signature.service.impl;
import cn.comtom.ewbs.signature.entity.SysRoleUser;
import cn.comtom.ewbs.signature.mapper.SysRoleUserMapper;
import cn.comtom.ewbs.signature.service.ISysRoleUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.comtom.ewbs.signature.common.vo.request.PageRequest;

/**
 * <p>
 * 用户角色中间表 服务实现类
 * </p>
 *
 * @author liuhy
 * @since 2022-11-04 18:07:25
 */
@Service
@Slf4j
public class SysRoleUserServiceImpl extends ServiceImpl<SysRoleUserMapper, SysRoleUser> implements ISysRoleUserService {
	
	@Override
	public IPage<SysRoleUser> selectPage(SysRoleUser sysRoleUser, PageRequest pageReq) {
		Page<SysRoleUser> page = new Page<SysRoleUser>(pageReq.getPage() , pageReq.getLimit() , true);
        LambdaQueryWrapper<SysRoleUser> wrapper = Wrappers.lambdaQuery();
        wrapper.setEntity(sysRoleUser);
        return this.baseMapper.selectPage(page, wrapper);
	}
}
